package com.chinaisafe.user.entity;

import java.io.Serial;
import com.chinaisafe.user.vo.request.SysLoginLogReqVO;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chinaisafe.base.mybatisplus.entity.BaseEntity;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * SysLoginLog
 * Description：登录日志实体类
 *
 * @author xuefu.shu
 * @date  2024-07-12 09:55:54
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("sys_login_log")
@Schema(name = "SysLoginLog", description = "登录日志")
public class SysLoginLog extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "用户id")
    @TableField("sys_user_id")
    private Long sysUserId;

    @Schema(description = "登录账号")
    @TableField("login_name")
    private String loginName;

    @Schema(description = "手机号")
    @TableField("mobile")
    private String mobile;

    @Schema(description = "微信openid")
    @TableField("wx_openid")
    private String wxOpenid;

    @Schema(description = "认证方式")
    @TableField("auth_type")
    private String authType;

    @Schema(description = "登录ip")
    @TableField("login_ip")
    private String loginIp;

    @Schema(description = "登录地点")
    @TableField("login_address")
    private String loginAddress;

    @Schema(description = "客户端类型")
    @TableField("`client`")
    private String client;

    @Schema(description = "登录状态(成功/失败)")
    @TableField("`status`")
    private Boolean status;

    @Schema(description = "访问时间")
    @TableField("login_time")
    private LocalDateTime loginTime;
}
